export default {
	data() {
		return {
			jindu: 45,
			option: {
				xAxis: {
					show: false,
					data: ['Mon', 'Tue', 'Wed', 'Thu'],
				},
				yAxis: {
					show: false
				},
				series: [{
					type: 'line',
					symbol: 'image://',
					symbolSize: 15,
					itemStyle: {
						borderWidth: 3,
						color: 'white',
					},
					label: {
						show: true,
						formatter: '{b}',
						fontSize: 14,
						lineHeight: 40
					},
					lineStyle: {
						color: '#6EE5FF',
						width: 1,
						type: 'solid'
					},
					data: [{
							value: 335,
							name: '好友数量',
						},
						{
							value: 679,
							name: '猫合成次数'
						},
						{
							value: 1548,
							name: '看视频次数'
						},
						{
							value: 148,
							name: '喵喵团收入'
						}
					],
				}]
			}
		}
	},
	methods: {
		onViewClick(options) {
			console.log(options)
		},
		changeOption() {
			const data = this.option.series[0].data
			// 随机更新示例数据
			data.forEach((item, index) => {
				data.splice(index, 1, Math.random() * 40)
			})
		},
		back() {
			uni.switchTab({
                url: '/pages/index/index?index=0',
            });
		},
		share(){
			uni.navigateTo({
				url: '/pages/yaoqingma/yaoqingma?show=1',
			});
		},
		fenhongmao(){
			var self = this
			self.$refs.popup.open()
		},
		close(){
			var self = this
			self.$refs.popup.close()
		},
	},
	onLoad(option) {
	    const jindu = Number(option.jindu);
		if(jindu>100){
			jindu = 100
		}
		this.jindu = Number(jindu)
	},
}
